]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionUtil: Add ExtensionFinder::extensions-loaded signal
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 28 Feb 2013 13:43:35 +0000 (14:43 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 28 Feb 2013 14:37:28 +0000 (15:37 +0100)
Consumers might want to defer work until the initial loading of
extensions has finished, so add an appropriate signal.

https://bugzilla.gnome.org/show_bug.cgi?id=694858

js/misc/extensionUtils.js

index 9e70e265fc155c1df9f2b6f0f76aeb3da2098dbd..7c6769a5a5f8557a0917606d6133ee12c583d1f0 100644 (file)
@@ -174,10 +174,15 @@ const ExtensionFinder = new Lang.Class({
         this.emit('extension-found', extension);
     },
 
+    _extensionsLoaded: function() {
+        this.emit('extensions-loaded');
+    },
+
     scanExtensions: function() {
         let perUserDir = Gio.File.new_for_path(global.userdatadir);
         FileUtils.collectFromDatadirsAsync('extensions',
                                            { processFile: Lang.bind(this, this._loadExtension),
+                                             loadedCallback: Lang.bind(this, this._extensionsLoaded),
                                              includeUserDir: true,
                                              data: perUserDir });
     }